package com.boomsecret.juc.collections;

import java.util.concurrent.CopyOnWriteArrayList;

/**
 * @author wangjinliang on 2019/1/23.
 */
public class CopyOnWriteArrayListDemo {
    public static void main(String[] args) {
        CopyOnWriteArrayList<String> copyOnWriteArrayList = new CopyOnWriteArrayList<>();
        copyOnWriteArrayList.add("cc");
        copyOnWriteArrayList.add("dd");
        copyOnWriteArrayList.add("aa");
        copyOnWriteArrayList.add("bb");

        for (String value : copyOnWriteArrayList) {
            System.out.println(value);
        }
    }
}
